﻿@model AppNet.Models.CompanyInfor

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.LogoFile)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.BannerFile)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Description)
        </th>
        <th></th>
    </tr>

    <tr>
        <td>
            <img src="@Model.LogoFile" alt="Logo file" />
        </td>
        <td>
            @if (Model.BannerType.Equals("image"))
            {
                <img src="@Model.BannerFile" alt="Banner file" />
            }
            else
            {
                <object  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0">
                    <param name="quality" value="high" /><param name="movie" value="@Model.BannerFile" />
                    <embed pluginspage="http://www.macromedia.com/go/getflashplayer" quality="high" src="@Model.BannerFile" type="application/x-shockwave-flash">
                    </embed>
                </object>
            }
        </td>
        <td>
            @Html.DisplayFor(model => model.Description)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id = Model.ID }) |
            @Html.ActionLink("Details", "Details", new { id = Model.ID }) |
            @Html.ActionLink("Delete", "Delete", new { id = Model.ID })
        </td>
    </tr>

</table>
